package com.atguigu.petstore.serve.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

/**
 * 服务-护理项目
 * @TableName serve_care_item
 */
@TableName(value ="serve_care_item")
@Data
public class ServeCareItem implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 护理项目名
     */
    @TableField(value = "care_item_name")
    private String careItemName;

    /**
     * 护理项目图标
     */
    @TableField(value = "care_item_icon")
    private String careItemIcon;

    /**
     * 护理项目所属组
     */
    @TableField(value = "care_item_group_id")
    private Long careItemGroupId;

    /**
     * 护理项目价格
     */
    @TableField(value = "care_item_price")
    private BigDecimal careItemPrice;

    /**
     * 护理项目原价
     */
    @TableField(value = "care_item_origin_price")
    private BigDecimal careItemOriginPrice;

    /**
     * 服务次数
     */
    @TableField(value = "care_count")
    private Integer careCount;

    /**
     * 护理项目描述
     */
    @TableField(value = "care_item_describe")
    private String careItemDescribe;

    /**
     * 护理项目描述图，多个用，分割
     */
    @TableField(value = "care_item_describe_imgs")
    private String careItemDescribeImgs;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ServeCareItem other = (ServeCareItem) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCareItemName() == null ? other.getCareItemName() == null : this.getCareItemName().equals(other.getCareItemName()))
            && (this.getCareItemIcon() == null ? other.getCareItemIcon() == null : this.getCareItemIcon().equals(other.getCareItemIcon()))
            && (this.getCareItemGroupId() == null ? other.getCareItemGroupId() == null : this.getCareItemGroupId().equals(other.getCareItemGroupId()))
            && (this.getCareItemPrice() == null ? other.getCareItemPrice() == null : this.getCareItemPrice().equals(other.getCareItemPrice()))
            && (this.getCareItemOriginPrice() == null ? other.getCareItemOriginPrice() == null : this.getCareItemOriginPrice().equals(other.getCareItemOriginPrice()))
            && (this.getCareCount() == null ? other.getCareCount() == null : this.getCareCount().equals(other.getCareCount()))
            && (this.getCareItemDescribe() == null ? other.getCareItemDescribe() == null : this.getCareItemDescribe().equals(other.getCareItemDescribe()))
            && (this.getCareItemDescribeImgs() == null ? other.getCareItemDescribeImgs() == null : this.getCareItemDescribeImgs().equals(other.getCareItemDescribeImgs()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCareItemName() == null) ? 0 : getCareItemName().hashCode());
        result = prime * result + ((getCareItemIcon() == null) ? 0 : getCareItemIcon().hashCode());
        result = prime * result + ((getCareItemGroupId() == null) ? 0 : getCareItemGroupId().hashCode());
        result = prime * result + ((getCareItemPrice() == null) ? 0 : getCareItemPrice().hashCode());
        result = prime * result + ((getCareItemOriginPrice() == null) ? 0 : getCareItemOriginPrice().hashCode());
        result = prime * result + ((getCareCount() == null) ? 0 : getCareCount().hashCode());
        result = prime * result + ((getCareItemDescribe() == null) ? 0 : getCareItemDescribe().hashCode());
        result = prime * result + ((getCareItemDescribeImgs() == null) ? 0 : getCareItemDescribeImgs().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", careItemName=").append(careItemName);
        sb.append(", careItemIcon=").append(careItemIcon);
        sb.append(", careItemGroupId=").append(careItemGroupId);
        sb.append(", careItemPrice=").append(careItemPrice);
        sb.append(", careItemOriginPrice=").append(careItemOriginPrice);
        sb.append(", careCount=").append(careCount);
        sb.append(", careItemDescribe=").append(careItemDescribe);
        sb.append(", careItemDescribeImgs=").append(careItemDescribeImgs);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}